package com.njegovanobradovic.so.impl;

import java.util.List;

import org.apache.tapestry5.ioc.annotations.Inject;

import com.njegovanobradovic.core.dao.HibernateDAO;
import com.njegovanobradovic.so.GetAll;

public class GetAllImpl<Type> implements GetAll<Type> {
	@Inject
	private HibernateDAO dao;
	private Class<Type> searchForType;
	public Class<Type> getSearchForType() {
		return searchForType;
	}
	public void setSearchForType(Class<Type> searchForType) {
		this.searchForType = searchForType;
	}
	public List<Type> execute() {
		return dao.get(getSearchForType());
	}
}
